In Attribute§

See primary documentation in context for Trait is default

An attribute that is assigned Nil will revert to its default value set with the trait is default. In the case of arrays or associatives, the argument of is default will set the default item value or hash value.

class C {
    has $.a is default(42is rw = 666
}
my $c = C.new;
say $c;
$c.a = Nil;
say $c;
# OUTPUT: «C.new(a => 666)␤C.new(a => 42)␤» 
class Foo {
    has @.bar is default(42is rw
};
my $foo = Foo.newbar => <a b c> );
$foo.bar =Nil;
say $foo# OUTPUT: «Foo.new(bar => [42])␤»